using System;
using dnAnalytics.Nli;

/// <summary>
/// Scale every third element by 5 starting with the first element.
/// </summary>
internal class Program {
	[STAThread]
	private static void Main() {
		//use the MKL BLAS provider
		IBlas blas = Blas.Provider(BlasProvider.Mkl);
		
		//vector to scale
		double[] vector = new double[] {1, 1, 1, 1, 1, 1, 1, 1};

		//call dscal
		blas.Dscal(vector.Length, 5, vector, 3);

		foreach(double value in vector) {
			Console.WriteLine(value);
		}
		/* 
		Output:
		5
		1
		1
		5
		1
		1
		5
		1
		*/
	}
}